<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>global_status_diff_nonzero: common_schema documentation</title>
	<meta name="description" content="global_status_diff_nonzero: common_schema" />
	<meta name="keywords" content="global_status_diff_nonzero: common_schema" />
	<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>

<body>
	<div id="main">
		<div id="header">
			<h1>common_schema</h1> <strong>2.2</strong> documentation
			<div class="subtitle">DBA's framework for MySQL</div>
		</div>
		<div id="contentwrapper">
			<div id="content">
				<h2><a href="global_status_diff_nonzero.html">global_status_diff_nonzero</a></h2>	
<h3>NAME</h3>
global_status_diff_nonzero: Status variables difference over time, only nonzero findings listed
<h3>TYPE</h3>
View

<h3>DESCRIPTION</h3>
<p></p>


<p><i>global_status_diff_nonzero</i> is a common implementation case for <a href="global_status_diff.html">global_status_diff</a>
</p>

<p>
This view merely presents with all <a href="global_status_diff.html">global_status_diff</a> where differences are found.
That is, a GLOBAL STATUS variable which indicated no change in the sampling duration, is filtered out.
</p>

<h3>STRUCTURE</h3>

<blockquote><pre>
mysql&gt; DESC common_schema.global_status_diff_nonzero;
+------------------------+---------------+------+-----+---------+-------+
| Field                  | Type          | Null | Key | Default | Extra |
+------------------------+---------------+------+-----+---------+-------+
| variable_name          | varchar(64)   | YES  |     | NULL    |       |
| variable_value_0       | longtext      | YES  |     | NULL    |       |
| variable_value_1       | varchar(1024) | YES  |     | NULL    |       |
| variable_value_diff    | double        | YES  |     | NULL    |       |
| variable_value_psec    | double        | YES  |     | NULL    |       |
| variable_value_pminute | double        | YES  |     | NULL    |       |
+------------------------+---------------+------+-----+---------+-------+
</pre></blockquote>

<h3>SYNOPSIS</h3>

<p>The structure of this view is identical to that of <a href="global_status_diff.html">global_status_diff</a>.
</p>

<h3>EXAMPLES</h3>

<p>Show GLOBAL STATUS changes (analyzing a QA server):</p>
<blockquote><pre>mysql&gt; SELECT * FROM common_schema.global_status_diff_nonzero;
+-----------------------------------+------------------+------------------+---------------------+---------------------+------------------------+
| variable_name                     | variable_value_0 | variable_value_1 | variable_value_diff | variable_value_psec | variable_value_pminute |
+-----------------------------------+------------------+------------------+---------------------+---------------------+------------------------+
| aborted_clients                   | 2308192          | 2308200          |                   8 |                 0.8 |                     48 |
| bytes_received                    | 48781508357      | 48781571162      |               62805 |              6280.5 |                 376830 |
| bytes_sent                        | 404710036897     | 404712641950     |             2605053 |            260505.3 |               15630318 |
| com_change_db                     | 3813988          | 3813997          |                   9 |                 0.9 |                     54 |
| com_delete                        | 5823865          | 5823897          |                  32 |                 3.2 |                    192 |
| com_insert                        | 50395791         | 50395868         |                  77 |                 7.7 |                    462 |
| com_insert_select                 | 11840815         | 11840832         |                  17 |                 1.7 |                    102 |
| com_select                        | 45527485         | 45527537         |                  52 |                 5.2 |                    312 |
| com_set_option                    | 100093882        | 100094023        |                 141 |                14.1 |                    846 |
| com_show_collations               | 3813977          | 3813986          |                   9 |                 0.9 |                     54 |
| com_show_variables                | 3813980          | 3813989          |                   9 |                 0.9 |                     54 |
| com_update                        | 5671892          | 5671897          |                   5 |                 0.5 |                     30 |
| connections                       | 3839731          | 3839740          |                   9 |                 0.9 |                     54 |
| created_tmp_disk_tables           | 859679           | 859681           |                   2 |                 0.2 |                     12 |
| created_tmp_tables                | 8731648          | 8731669          |                  21 |                 2.1 |                    126 |
| handler_commit                    | 114182717        | 114182891        |                 174 |                17.4 |                   1044 |
| handler_delete                    | 10772896         | 10772927         |                  31 |                 3.1 |                    186 |
| handler_read_first                | 5913266          | 5913293          |                  27 |                 2.7 |                    162 |
| handler_read_key                  | 788386238        | 788387730        |                1492 |               149.2 |                   8952 |
| handler_read_next                 | 255429456        | 255469852        |               40396 |              4039.6 |                 242376 |
| handler_read_rnd                  | 410066910        | 410068623        |                1713 |               171.3 |                  10278 |
| handler_read_rnd_next             | 2530187881       | 2530208075       |               20194 |              2019.4 |                 121164 |
| handler_update                    | 25384145         | 25384216         |                  71 |                 7.1 |                    426 |
| handler_write                     | 2054152644       | 2054159103       |                6459 |               645.9 |                  38754 |
| innodb_buffer_pool_pages_data     | 30052            | 30057            |                   5 |                 0.5 |                     30 |
| innodb_buffer_pool_pages_dirty    | 183              | 204              |                  21 |                 2.1 |                    126 |
| innodb_buffer_pool_pages_flushed  | 38805231         | 38805438         |                 207 |                20.7 |                   1242 |
| innodb_buffer_pool_pages_free     | 4                | 1                |                  -3 |                -0.3 |                    -18 |
| innodb_buffer_pool_pages_misc     | 1943             | 1941             |                  -2 |                -0.2 |                    -12 |
| innodb_buffer_pool_read_requests  | 2205096023       | 2205140951       |               44928 |              4492.8 |                 269568 |
| innodb_buffer_pool_reads          | 9070710          | 9070712          |                   2 |                 0.2 |                     12 |
| innodb_buffer_pool_write_requests | 1009629688       | 1009632455       |                2767 |               276.7 |                  16602 |
| innodb_data_fsyncs                | 5691358          | 5691388          |                  30 |                   3 |                    180 |
| innodb_data_read                  | 3709091840       | 3709104128       |               12288 |              1228.8 |                  73728 |
| innodb_data_reads                 | 9526208          | 9526211          |                   3 |                 0.3 |                     18 |
| innodb_data_writes                | 101457695        | 101457999        |                 304 |                30.4 |                   1824 |
| innodb_data_written               | 1160983040       | 1165887488       |             4904448 |            490444.8 |               29426688 |
| innodb_dblwr_pages_written        | 38805231         | 38805438         |                 207 |                20.7 |                   1242 |
| innodb_dblwr_writes               | 610255           | 610258           |                   3 |                 0.3 |                     18 |
| innodb_log_write_requests         | 341450412        | 341451248        |                 836 |                83.6 |                   5016 |
| innodb_log_writes                 | 70075432         | 70075559         |                 127 |                12.7 |                    762 |
| innodb_os_log_fsyncs              | 2336505          | 2336517          |                  12 |                 1.2 |                     72 |
| innodb_os_log_written             | 2583788544       | 2584199168       |              410624 |             41062.4 |                2463744 |
| innodb_pages_created              | 1152396          | 1152398          |                   2 |                 0.2 |                     12 |
| innodb_pages_read                 | 9846270          | 9846273          |                   3 |                 0.3 |                     18 |
| innodb_pages_written              | 38805231         | 38805438         |                 207 |                20.7 |                   1242 |
| innodb_rows_deleted               | 10772886         | 10772917         |                  31 |                 3.1 |                    186 |
| innodb_rows_inserted              | 35117242         | 35117332         |                  90 |                   9 |                    540 |
| innodb_rows_read                  | 1197149081       | 1197203914       |               54833 |              5483.3 |                 328998 |
| innodb_rows_updated               | 22474281         | 22474351         |                  70 |                   7 |                    420 |
| key_read_requests                 | 21689837         | 21689845         |                   8 |                 0.8 |                     48 |
| open_files                        | 7                | 5                |                  -2 |                -0.2 |                    -12 |
| opened_files                      | 3666398          | 3666406          |                   8 |                 0.8 |                     48 |
| questions                         | 232437302        | 232437654        |                 352 |                35.2 |                   2112 |
| select_full_join                  | 99               | 100              |                   1 |                 0.1 |                      6 |
| select_range                      | 753753           | 753754           |                   1 |                 0.1 |                      6 |
| select_scan                       | 13123762         | 13123808         |                  46 |                 4.6 |                    276 |
| sort_rows                         | 409565982        | 409567695        |                1713 |               171.3 |                  10278 |
| sort_scan                         | 801869           | 801872           |                   3 |                 0.3 |                     18 |
| table_locks_immediate             | 129542449        | 129542648        |                 199 |                19.9 |                   1194 |
| threads_cached                    | 7                | 8                |                   1 |                 0.1 |                      6 |
| threads_created                   | 838815           | 838817           |                   2 |                 0.2 |                     12 |
+-----------------------------------+------------------+------------------+---------------------+---------------------+------------------------+
</pre></blockquote>

<p>Show GLOBAL STATUS changes (analyzing a stale, quiet server):</p>
<blockquote><pre>mysql&gt; SELECT * FROM common_schema.global_status_diff_nonzero;
+-----------------------+------------------+------------------+---------------------+---------------------+------------------------+
| variable_name         | variable_value_0 | variable_value_1 | variable_value_diff | variable_value_psec | variable_value_pminute |
+-----------------------+------------------+------------------+---------------------+---------------------+------------------------+
| handler_read_rnd_next | 3871             | 4458             |                 587 |                58.7 |                   3522 |
| handler_write         | 10868            | 11746            |                 878 |                87.8 |                   5268 |
| open_files            | 39               | 37               |                  -2 |                -0.2 |                    -12 |
| select_full_join      | 3                | 4                |                   1 |                 0.1 |                      6 |
| select_scan           | 30               | 32               |                   2 |                 0.2 |                     12 |
+-----------------------+------------------+------------------+---------------------+---------------------+------------------------+
</pre></blockquote>
<p>Note in the above that merely querying this view causes some status variables to change.</p>

<h3>ENVIRONMENT</h3>
MySQL 5.1 or newer

<h3>SEE ALSO</h3>
<a href="global_status_diff.html">global_status_diff</a>,
<a href="global_status_diff_clean.html">global_status_diff_clean</a>

<h3>AUTHOR</h3>
Shlomi Noach
				<br/>
			</div>
			<div id="sidebarwrapper">
				<div id="search">
					Search online documentation
					<form id="search_form" name="search_form" method="GET" 
						action="http://www.google.com/search" 
						onsubmit="document.forms['search_form']['q'].value = 'site:http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/ '+document.forms['search_form']['search_term'].value;">
						<input type="text" name="search_term" value=""/>
						<input type="hidden" name="q" value=""/>
						<input type="submit" value="go"/>						
					</form>
				</div>
				<div id="menu">
					<ul>
						<li><a title="Introduction" href="introduction.html">Introduction</a></li>
						<li><a title="Documentation" href="documentation.html">Documentation</a></li>
						<li><a title="Download" href="download.html">Download</a></li>
						<li><a title="Install" href="install.html">Install</a></li>
						<li><a title="Risks" href="risks.html">Risks</a></li>
					</ul>						
					<h3>QUERY SCRIPT</h3>
					<ul>
						<li><a title="QueryScript" href="query_script.html">QueryScript</a></li>
						<li><a title="Execution" href="query_script_execution.html">Execution</a></li>
						<li><a title="Flow control" href="query_script_flow_control.html">Flow control</a></li>
						<li><a title="Statements" href="query_script_statements.html">Statements</a></li>
						<li><a title="Expressions" href="query_script_expressions.html">Expressions</a></li>
						<li><a title="Variables" href="query_script_variables.html">Variables</a></li>
					</ul>						
					<h3>DEBUG</h3>
					<ul>
						<li><a title="rdebug" href="rdebug.html">rdebug</a></li>
						<li><a title="rdebug API" href="rdebug_api.html">rdebug API</a></li>
						<li><a title="rdebug workflow" href="rdebug_workflow.html">Workflow</a></li>
					</ul>						
					<h3>ROUTINES</h3>
					<ul>
						<li><a title="Execution &amp; flow control" href="execution_routines.html">Execution & flow control</a></li>
						<li><a title="General" href="general_routines.html">General</a></li>
						<li><a title="Process" href="process_routines.html">Process</a></li>
						<li><a title="Query analysis" href="query_analysis_routines.html">Query analysis</a></li>
						<li><a title="Schema analysis" href="schema_analysis_routines.html">Schema analysis</a></li>
						<li><a title="Security" href="security_routines.html">Security</a></li>
						<li><a title="Text" href="text_routines.html">Text</a></li>
						<li><a title="Time &amp; date" href="temporal_routines.html">Time & date</a></li>
						<li><a title="Charting" href="charting_routines.html">Charting</a></li>
					</ul>
					<h3>VIEWS</h3>
					<ul>
						<li><a title="Schema analysis" href="schema_analysis_views.html">Schema analysis</a></li>
						<li><a title="Data dimension" href="data_dimension_views.html">Data dimension</a></li>
						<li><a title="Process" href="process_views.html">Process</a></li>
						<li><a title="Security" href="security_views.html">Security</a></li>
						<li><a title="Monitoring" href="monitoring_views.html">Monitoring</a></li>
						<li><a title="InnoDB Plugin" href="innodb_plugin_views.html">InnoDB Plugin</a></li>
						<li><a title="Percona server" href="percona_server_views.html">Percona Server</a></li>
						<li><a title="TokuDB" href="tokudb_views.html">TokuDB</a></li>
					</ul>						
					<h3>DATA</h3>
					<ul>
						<li><a title="tables" href="tables.html">Tables</a></li>
						<li><a title="variables" href="variables.html">Variables</a></li>
					</ul>						
					<h3>META</h3>
					<ul>
						<li><a title="Help" href="help.html">help</a></li>
						<li><a title="Metadata" href="metadata.html">metadata</a></li>
						<li><a title="status" href="status.html">status</a></li>
					</ul>						
				</div>
			</div>	
			<div class="clear">&nbsp;</div>
			
			<div id="footnote" align="center">
				<a href="">common_schema</a> documentation
			</div>
		</div>
	</div>
</body>
</html>
